import { regs } from '@/utils/validate'

export const studyColumn = [
  {
    prop: 'date',
    label: '时间',
    canEdit: true,
    type: 'date',
    width: '256',
    required: true,
    formProps: {
      type: 'daterange',
      style: { width: '100%' }
    }
  },
  {
    prop: 'description',
    label: '描述',
    required: true,
    canEdit: true
  },
  {
    prop: 'action',
    label: '操作',
    width: '100'
  }
]

export const familyColumn = [
  {
    prop: 'name',
    label: '姓名',
    required: true,
    canEdit: true,
    width: '100'
  },
  {
    prop: 'relation',
    label: '关系',
    canEdit: true,
    required: true,
    type: 'select',
    formProps: {
      dictKey: 'relationships',
      props: { value: 'value', label: 'label' }
    },
    width: '100'
  },
  {
    prop: 'education',
    label: '学历',
    canEdit: true,
    type: 'select',
    formProps: {
      dictKey: 'educations',
      props: { value: 'value', label: 'label' }
    },
    width: '100'
  },
  {
    prop: 'phone',
    label: '电话',
    required: true,
    reg: regs.phone,
    canEdit: true,
    width: '120'
  },
  {
    prop: 'unit',
    label: '单位',
    canEdit: true,
    width: '100'
  },
  {
    prop: 'emergency',
    label: '紧急联系人',
    canEdit: true,
    type: 'select',
    formProps: {
      dictKey: 'yesNo',
      props: { value: 'value', label: 'label' }
    },
    width: '120'
  },
  {
    prop: 'action',
    label: '操作',
    width: '140'
  }
]
